#ifndef SYNTAX_TREE__H
#define SYNTAX_TREE__H

#include "sym.h"

struct tree_node{
    int type,first_line,rule;
    unsigned not_null,ch_num;
    const char * info;
    union{
        int type_int;
        float type_float;
        char * type_name;
    }data;
    struct tree_node * ch[7];
};
typedef struct tree_node tree_node;
extern tree_node * root;
void treeNodeCheck(const tree_node * x);
tree_node * treeNodeInit(int id,int first_line,int rule);
void treeNodeInsert(tree_node * x,tree_node * y);
void treeNodeDFS(const tree_node * now,void (*func)(const tree_node *a));
tree_node * treeNodeTokenInit(int id,int first_line);

#endif
